<?php
namespace shenka\controllers;

use Yii;
use yii\web\Controller;

/*
* @author admin 
* @class Upactive
* @desc 神卡系列产品激活更新管理
*/

class UpactiveController extends Controller {
	/*
	* @author admin 
	* @function index
	* @desc 神卡系列激活更新管理
	*/ 
	public $layout = 'second';
	public function actionIndex(){
		$view = Yii::$app->view;
		$view->params['layout_data'] = '产品激活管理';

		if(isset($_POST['submits'])){

            $data=$_POST;
            unset($data['_csrf']);
            unset($data['submits']);
            file_put_contents('./control.json',json_encode($data));

        }
        
        $init_data=json_decode(file_get_contents('./control.json'),true);
        return $this->render('index',['init_data'=>$init_data]);
	}
}